﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities;

namespace HCMS.Entities.Base
{
    /// <summary>
    /// 公告 系统
    /// </summary>
    [Table("notice")]
    public class Notice : Entity<int>
    {
        /// <summary>
        /// Id
        /// </summary>
        public new int Id { get; set; }

        /// <summary>
        /// 创建 时间
        /// </summary>
        [Column("create_time")]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 创建 人
        /// </summary>
        [Column("create_user")]
        public string CreateUser { get; set; } = "";

        /// <summary>
        /// 更新 时间
        /// </summary>
        [Column("update_time")]
        public DateTime UpdateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新 人
        /// </summary>
        [Column("update_user")]
        public string UpdateUser { get; set; } = "";

        /// <summary>
        /// 状态
        /// </summary>
        [Column("status")]
        public int Status { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [Column("title")]
        public string Title { get; set; } = "";

        /// <summary>
        /// 内容
        /// </summary>
        [Column("content")]
        public string Content { get; set; } = "";

        /// <summary>
        /// 类型
        /// </summary>
        /// <remarks>
        /// 1：系统公告、2：公司通知
        /// </remarks>
        [Column("type_id")]
        public int TypeId { get; set; }

        /// <summary>
        /// 过期 时间
        /// </summary>
        [Column("expires_time")]
        public DateTime ExpiresTime { get; set; } = DateTime.MaxValue;

        /// <summary>
        /// 接收 类型
        /// </summary>
        /// <remarks>
        /// 1：所有人、2：指定人员、3：指定角色
        /// </remarks>
        [Column("receive_type")]
        public string ReceiveType { get; set; } = "";

        /// <summary>
        /// 发布 时间
        /// </summary>
        [Column("release_time")]
        public DateTime ReleaseTime { get; set; } = DateTime.MinValue;

        /// <summary>
        /// 定时 发布 时间
        /// </summary>
        [Column("auto_release_time")]
        public DateTime AutoReleaseTime { get; set; } = DateTime.MinValue;
    }
}
